'''
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with self work for additional information
 * regarding copyright ownership.  The ASF licenses self file
 * to you under the Apache License, Version 2.0 (the
 * "License") you may not use self file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
'''


#import org.apache.jena.assembler.assemblers.*;

'''
   Assembler initialization - so it works when inside class initialization processes.
   Assembler is an interface and constants are statics (implicitly or explicitly final)
   which makes controlling order tricky.
  
   Solution: initialization code (ie. inside jenaSystem.init) must use teh methods here, 
   and not Assembler.constant.
   
   Use ConstAssembler.general(), not Assembler.general.
'''
ConstAssembler

    private static Assembler defaultModel = null

    # param 
    # result static Assembler
    def defaultModel(self):
        if (defaultModel is None):
            defaultModel = DefaultModelAssembler()
        return defaultModel
    

    private static Assembler memoryModel = null

    # param 
    # result static Assembler
    def memoryModel(self):
        if (memoryModel is None):
            memoryModel = MemoryModelAssembler()
        return memoryModel
    

    private static Assembler infModel = null

    # param 
    # result static Assembler
    def infModel(self):
        if (infModel is None):
            infModel = InfModelAssembler()
        return infModel
    

    private static Assembler ontModel = null

    # param 
    # result static Assembler
    def ontModel(self):
        if (ontModel is None):
            ontModel = OntModelAssembler()
        return ontModel
    

    private static Assembler reasonerFactory = null

    # param 
    # result static Assembler
    def reasonerFactory(self):
        if (reasonerFactory is None):
            reasonerFactory = ReasonerFactoryAssembler()
        return reasonerFactory
    

    private static Assembler content = null

    # param 
    # result static Assembler
    def content(self):
        if (content is None):
            content = ContentAssembler()
        return content
    

    private static Assembler prefixMapping = null

    # param 
    # result static Assembler
    def prefixMapping(self):
        if (prefixMapping is None):
            prefixMapping = PrefixMappingAssembler()
        return prefixMapping
    

    private static Assembler unionModel = null

    # param 
    # result static Assembler
    def unionModel(self):
        if (unionModel is None):
            unionModel = UnionModelAssembler()
        return unionModel
    

    private static Assembler ontModelSpec = null

    # param 
    # result static Assembler
    def ontModelSpec(self):
        if (ontModelSpec is None):
            ontModelSpec = OntModelSpecAssembler()
        return ontModelSpec
    

    private static Assembler ruleSet = null

    # param 
    # result static Assembler
    def ruleSet(self):
        if (ruleSet is None):
            ruleSet = RuleSetAssembler()
        return ruleSet
    

    private static Assembler modelSource = null

    # param 
    # result static Assembler
    def modelSource(self):
        if (modelSource is None):
            modelSource = ModelSourceAssembler()
        return modelSource
    

    private static Assembler locationMapper = null

    # param 
    # result static Assembler
    def locationMapper(self):
        if (locationMapper is None):
            locationMapper = LocationMapperAssembler()
        return locationMapper
    

    private static Assembler fileManager = null

    # param 
    # result static Assembler
    def fileManager(self):
        if (fileManager is None):
            fileManager = FileManagerAssembler()
        return fileManager
    

    private static Assembler documentManager = null

    # param 
    # result static Assembler
    def documentManager(self):
        if (documentManager is None):
            documentManager = DocumentManagerAssembler()
        return documentManager
    

    private static AssemblerGroup general = null

    # param 
    # result static AssemblerGroup
    def general(self):
        if (general is None):
            general = AssemblerGroup.create()
                    .implementWith(JA.DefaultModel, defaultModel())
                    .implementWith(JA.MemoryModel, memoryModel())
                    .implementWith(JA.InfModel, infModel())
                    .implementWith(JA.ReasonerFactory, reasonerFactory())
                    .implementWith(JA.ModelSource, modelSource())
                    .implementWith(JA.Content, content())
                    .implementWith(JA.ContentItem, content())
                    .implementWith(JA.UnionModel, unionModel())
                    .implementWith(JA.PrefixMapping, prefixMapping())
                    .implementWith(JA.SinglePrefixMapping, prefixMapping())
                    .implementWith(JA.OntModel, ontModel())
                    .implementWith(JA.OntModelSpec, ontModelSpec())
                    .implementWith(JA.RuleSet, ruleSet())
                    .implementWith(JA.LocationMapper, locationMapper())
                    .implementWith(JA.FileManager, fileManager())
                    .implementWith(JA.DocumentManager, documentManager())
            
        
        return general
    

